// src/router/index.ts
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import Home from '../views/Home.vue';
import TodoList from '../views/todo/manage/index.vue';

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'Home',
        component: Home,
    },
    {
        path: '/login',
        component: () => import('@/views/login'),
        meta: {
            hidden: true  // 使用 meta 字段
        }
    },
    {
        path: '/todos',
        name: 'TodoList',
        component: TodoList,
    },
];

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes,
});

export default router;
